package com.neusoft.demo3;

public class MethodDemo {

    public void m1(Student student) {
        System.out.println(student.getSid()+"---"+student.getSname());
    }

    public Student m2() {
        Student s1 = new Student();
        s1.setSid(101);
        s1.setSname("gibson");
        return s1;
    }

    public static void main(String[] args) {
        MethodDemo demo = new MethodDemo();
        Student s1 = new Student();
        s1.setSid(100);
        s1.setSname("fender");
        demo.m1(s1);
        Student s = demo.m2();
        System.out.println(s.getSid() + "---" + s.getSname());

    }
}
